package com.exam.common.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.exam.common.dao.TestPaperMapper;
import com.exam.common.pojo.TestPaper;
import com.exam.common.service.ITestPaperService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;

/**
 * <p>
 * 试卷 服务实现类
 * </p>
 *
 * @author rock
 * @since 2021-11-15
 */
@Service
public class TestPaperServiceImpl implements ITestPaperService {

    @Autowired(required = false)
    TestPaperMapper testPaperMapper;

    @Override
    public HashMap<String, Object> selectName(String testPaperName) {
        QueryWrapper<TestPaper> queryWrapper=new QueryWrapper<>();
        queryWrapper.eq("test_paper_name",testPaperName);
        List<TestPaper> list = testPaperMapper.selectList(queryWrapper);
        HashMap<String, Object> map=new HashMap<>();
        map.put("list",list);

        return map;
    }
}
